import axios from '@/request/index'

export function login(data) {
    return axios({
        method: "post",
        url: "/login",
        data: data
    })
}
export function addTask(data){
    return axios({
        method:"post",
        url:"/user/addTask",
        data:data
    })
}
export function getTask(data){
    return axios({
        method:"post",
        url:"/user/getTask",
        data:data
    })
}

export function getUserName(data){
    return axios({
        method:"post",
        url:"/user/getUserName",
        data:data
    })
}

export function acceptTask(data){
    return axios({
        method:"get",
        url:"/user/acceptTask?taskId="+data,
    })
}

export function finishTask(data){
    return axios({
        method:"get",
        url:"/user/finishTask?taskId="+data,
    })
}

export function allUsers(){
    return axios({
        method:"get",
        url:"/user/allUsers",
    })
}

export function cancelTask(data){
    return axios({
        method:"post",
        url:"/user/cancelTask",
        data:data
    })
}

export function disableUser(data){
    return axios({
        method:"post",
        url:"/user/disableUser",
        data:data
    })
}

export function register(data){
    return axios({
        hearders: "application/x-www-form-urlencoded; charset=UTF-8",
        method:"post",
        url:"/register",
        data:data
    })
}

export function userProfile(data){
    return axios({
        method:"post",
        url:"/user/userProfile",
        data:data
    })
}

export function lookuserProfile(data){
    return axios({
        method:"get",
        url:"/user/userProfile?id="+data
    })
}

export function addFeedBack(data){
    return axios({
        method:"post",
        url:"/feedback/add",
        data:data
    })
}

export function addComplaints(data){
    return axios({
        method:"post",
        url:"/complaints/add",
        data:data
    })
}

export function feedbacklist(){
    return axios({
        method:"get",
        url:"/feedback/list"
    })
}

export function complaintslist(){
    return axios({
        method:"get",
        url:"/complaints/list"
    })
}

export function complaintsfinish(data){
    return axios({
        method:'post',
        url:"/complaints/finish",
        data:data
    })
}
